<?php
namespace app\common\validate;

use think\Validate;

class CommentValidate extends Validate
{
    protected $rule =   [
        'pid|评论ID'        => 'require|integer',
        'user_id|用户ID'    => 'require|integer',
        'obj_id|目标ID'     => 'require|integer',
        'comment_id|目标ID'     => 'require|integer',
        'content|评论内容'  => 'require',
    ];
    
    protected $scene = [
        'add'      => ['pid', 'user_id', 'obj_id', 'content'],
        'like'     => ['user_id', 'comment_id'],
    ];
}